package core.manager.battle.events
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	
	public class BattleEvent extends Event
	{	
		public static const ROUND_CHANGE:String = "round_change";
		
		public static const TURN_CHANGE:String = "round_change";
		
		public static const AVATAR_CHANGE:String = "avatar_change";
		
		public function BattleEvent(type:String , _params:* = null)
		{
			params = _params;
			super(type);
		}
		
		public var params:*;
		
		
		
		
		
		
		
		
		
		
		private static var battleEventCenter:EventDispatcher = new EventDispatcher();
		
		public static function addEventListener(eventStr:String , functionValue:Function):void
		{
			battleEventCenter.addEventListener( eventStr , functionValue );
		}
		
		public static function removeEventListener(eventStr:String , functionValue:Function):void
		{
			battleEventCenter.removeEventListener( eventStr , functionValue );
		}
		
		public static function dispatchEvent(eventStr:String , params:* = null):void
		{
			battleEventCenter.dispatchEvent(new BattleEvent(eventStr , params));
		}
	}
}